import request from '@/utils/request'

// 分页查询员工页面
export function fetchpersonnelList(param) {
  return request({
    url: `/iss/staff/list/${param.page}/${param.size}?storeId=${param.storeId}&key=${param.key}&value=${param.value}`,
    method: 'get',
    param: param
  })
}
// 添加新员工
export function createnewstaff(data) {
  return request({
    url: '/iss/staff/saveOne',
    method: 'post',
    data
  })
}
// 编辑员工
export function updateData(data) {
  return request({
    url: '/iss/staff/updateOne',
    method: 'post',
    data
  })
}
// 删除员工
export function Delete(id) {
  return request({
    url: `/iss/staff/deleteById/${id}`,
    method: 'get',
    id
  })
}

